1. Field of the Invention
The invention relates to a timing recovery apparatus and method thereof, and more particularly, to a timing recovery apparatus and method thereof for a multimedia processing system.
2. Description of the Related Art
FIG. 1a shows a conventional multimedia processing system 100, e.g. multimedia processing system, coupled to a peripheral processing unit 110, e.g. CableCARD. The CableCARD 110 is a device externally detachable to the multimedia processing system 100. Paid programs are typically encrypted, thus, CableCARD 110 is provided to authorize users for decrypting the encrypted programs. In multimedia processing system 100, an input node, for example a tuner/demodulator 102, receives a transmission signal #RF to obtain an encrypted stream #ED containing a program. The CableCARD 110 decrypts the encrypted stream #ED and outputs a decrypted stream #DS. A processor 104 in the multimedia processing system 100 then processes the decrypted stream #DS based on a clock signal #CLK generated from an oscillator 120 so as to display the program. According to the MPEG standard, the transmission signal #RF comprises program packets and a plurality of program clock reference #PCR as an indication of relative timing of the program packets. Thereby, the program can be correctly displayed. Conventionally, the oscillator 120 is designed to synchronous with a transmitter (not shown) from which the transmission signal #RF is sent. The accuracy of oscillator 120 affects the frame rate of the decrypted stream #DS during playback. If the oscillator 120 is not synchronous to the transmitter, the data flow of the decrypted stream #DS may underrun or overrun, causing undesirable jitters. To ensure oscillator 120 synchronize with the transmitter, the multimedia processing system 100 further comprises a system timer 130, a parser 140 and a compensator 150. The system timer 130 is driven by the clock signal #CLK provided from oscillator 120 to generate a time value #T. The parser 140 receives the output from CableCARD 110 and extracts program clock references #PCR from the decrypted stream #DS. The compensator 150 performs timing recovery by observing variation of the program clock reference #PCR on a basis of the time value #T. In normal cases, the difference between the time value #T and program clock reference #PCR is a constant value. If the oscillator 120 is inaccurate, an error value between the program clock reference #PCR and the time value #T gradually increases, and the compensator 150 adjusts the oscillator 120 by generating a control voltage ΔV to converge the error.
FIG. 1b is a flowchart of the conventional timing recovery method for a multimedia processing system. The data flow between the multimedia processing system 100 and CableCARD 110 can be summarized as follows. In step 101, the tuner/demodulator 102 receives a transmission signal #RF and outputs an encrypted stream #ED to the CableCARD 110. In step 103, the CableCARD 110 decrypts the encrypted stream #ED to generate a decrypted stream #DS. In step 105, the processor 104 processes the decrypted stream #DS to display the program. In step 107, program clock reference #PCR is extracted for timing recovery performed by the compensator 150 to maintain accuracy of the oscillator 120. The program clock reference #PCR, however, may not be a good reference for timing recovery because the decrypted stream may not a stable flow. For example, the time for decrypting of each program packet may be varied. Furthermore, when the multimedia processing system 100 is implemented to support multi-channel mode, packets of each channel may simultaneously be received and queued before sequential processing by CableCARD 110. The queued time is also variable, so the program clock reference #PCR obtained in the parser 140 is no more clock dependent. If the irregular program clock reference #PCR is used to perform timing recovery of the oscillator 120, undeterminable errors such as jitters may occur. Thus, an enhanced timing recovery is desirable.